<?php

abstract class Skjb_Search_Xapian_Weight
{
    public $_cPtr=null;
    
    function __construct($h) {
        $this->_cPtr=$h;
    }

    function name() {
        return Weight_name($this->_cPtr);
    }

    function serialise() {
        return Weight_serialise($this->_cPtr);
    }

    function unserialise($s) {
        $r=Weight_unserialise($this->_cPtr,$s);
        return is_resource($r) ? new Skjb_Search_Xapian_Weight($r) : $r;
    }

    function get_sumpart($wdf,$len) {
        return Weight_get_sumpart($this->_cPtr,$wdf,$len);
    }

    function get_maxpart() {
        return Weight_get_maxpart($this->_cPtr);
    }

    function get_sumextra($len) {
        return Weight_get_sumextra($this->_cPtr,$len);
    }

    function get_maxextra() {
        return Weight_get_maxextra($this->_cPtr);
    }

    function get_sumpart_needs_doclength() {
        return Weight_get_sumpart_needs_doclength($this->_cPtr);
    }
}